#!/bin/sh
# Created on 2010-06-10 by Jimmy Wu
# Calls GSSToGraph on .gss files and outputs them to .graph
# The matrix files are given the extension .gmatrix
# The vertex files are given the extension .vertex
#
# Environment:
#   CLASSPATH	must include everything the generators need to run

usage () {
    echo "Usage: $(basename $0) reduce gss_file ..."
}


if [ $# -lt 2 ] ; then
    usage >&2
    exit 1
fi

reduce="$1"
shift

for gss ; do
    base="${gss%.gss}"
    gmatrix="$base.gmatrix"
    graph="$base.graph"
    vertex="$base.vertex"

    java gss.GSSToGraph "$reduce" "$gss" "$graph" "$gmatrix" "$vertex"
done

